home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
PASCAL
/
1463.ZIP
/
DRAW-2D.ARC
/
DRAW2D.DOC
< prev
next >
Wrap
Text File
|
1987-06-13
|
21KB
|
536 lines
CPCUG 1987 SOFTWARE PROGRAMMING CONTEST
DRAW-2D: A 2-D GRAPHICS EDITOR V4.0
USER'S GUIDE
SUBMITTED BY: David J. Powers
190 Timber
Marquette, Mich 49855
(906) 249-3205
June 10, 1987
*************************************************************
* *
* Permission is granted for Capital PC and other *
* *
* not-for-profit organizations to distribute the source *
* *
* and executable portions of the program DRAW-2D. *
* *
*************************************************************
DRAW-2D: A 2-D GRAPHICS EDITOR Page 2
TABLE OF CONTENTS
1.0 INTRODUCTION
2.0 SYSTEM REQUIREMENTS
3.0 INSTALLATION
4.0 PROGRAM CONVENTIONS
5.0 GRAPHIC OBJECTS
6.0 GRAPHIC OPERATIONS
7.0 UTILITY OPERATIONS
8.0 CONFIGURATION OPTIONS
9.0 MAKING CHANGES AND RE-COMPILING DRAW-2D
10.0 PROGRAM LIMITATIONS & FUTURE ENHANCEMENTS
DRAW-2D: A 2-D GRAPHICS EDITOR Page 3
1.0 INTRODUCTION
DRAW-2D is an easy to use, yet effective, 2-D graphics
editor program. The goal of this software is to
provide the same type of editing functions for
graphic objects as is normally found in text
editor programs dealing with words. Due to the
inherent difference in graphic objects and text
objects, some functions unique to graphics are
included in this software. DRAW-2D is limited in
scope to dealing only with graphic objects. No
text or word processing capabilities are included.
2.0 SYSTEM REQUIREMENTS
DRAW-2D will run on any IBM-PC/XT/AT or strict
compatible with:
o 128K of memory
o at least one 160K floppy disk
o CGA (color graphics adapter) board
with either an RGB or composite monitor
o Serial port for mouse input device
o Microsoft Mouse or compatible
o DOS V2.0 or higher
Optional hardware:
o Epson or compatible printer for graphics output
o Math Co-processor for faster calculations
3.0 INSTALLATION
The following files are supplied with this software:
DRAW2D.DOC -- documentation file
DRAW2D.COM -- 2-D graphics editor
DRAW2DM.COM -- 2-D graphics editor with
Math Co-processor support
DRAW2D.HDR -- program header
DRAW.BAT -- execution Batch file
*.PAS -- Turbo Pascal source files
Merely copy these files to a floppy or hard disk. The
following files must also reside on your working disk:
GRAPHICS.COM -- DOS resident graphics print
screen utility
MOUSE.COM -- resident Microsoft Serial
Mouse driver
MODE.COM -- DOS utility
DRAW-2D: A 2-D GRAPHICS EDITOR Page 4
3.0 INSTALLATION (continued)
To start the program, enter the following commands
at the DOS prompt,
>MODE BW80
>GRAPHICS (to load resident print utility)
>MOUSE (to load resident Mouse driver)
>DRAW2D (or DRAW2DM if you have Math
Co-processor)
or use the Batch file 'DRAW.BAT'
>DRAW
DRAW-2D: A 2-D GRAPHICS EDITOR Page 5
4.0 PROGRAM CONVENTIONS
4.1 TERMINAL BELL
The beeping of the terminal is used to indicate
one of two conditions:
o a prompt for user input
o an error condition
The terminal bell can be suppressed during user
prompts by turning the BELL off through the
CONFIG Sub-menu. There is no way to suppress the
bell for error conditions. In fact, if no more
free space is available in memory for objects,
the bell will sound continuously while the cursor
is in the graphic area.
4.2 SCREEN AREAS
The monitor screen is divided up into three distinct
areas:
o The first 20 lines are used as the
graphics display window. In this area,
the mouse cursor looks like a cross, "+".
o The next line (line 21) is used for the
menu options. In this area, the mouse
cursor looks like a pointer, "<-".
o The next two lines (lines 22 & 23) are
the status lines. The mouse cursor
is not used in this area.
o The next line (line 24) is used as a
message/prompt area. The mouse cursor
is not used in this area.
4.3 USER INPUT
There are two ways to input information into the
computer:
o Keyboard input is solicited by displaying
prompts that end in a colon, ":", or by
indicating that a key is to be pressed.
o Mouse input is solicited by displaying
prompts that end in a greater than sign,
">", or by indicating that a button is to
be pressed. The LEFT MOUSE BUTTON (LMB)
is used as the main selection button, and
the RIGHT MOUSE BUTTON (RMB) is used to
pick alternative selections or to cancel.
DRAW-2D: A 2-D GRAPHICS EDITOR Page 6
5.0 GRAPHIC OBJECTS
Graphic objects are the items to be operated
on by the graphics editor. The following
basic objects are selectable with this software:
1) POINT
2) LINE
3) VERTICAL LINE
4) HORIZONTAL LINE
5) BOX or RECTANGLE
6) CIRCLE
These simple objects can be used to create more
complex drawing objects.
All objects can be defined by one or more points.
Points are selected by using the Mouse cursor and
buttons. POINTS can be selected by moving the
Mouse cursor to the desired position and pressing
the LEFT MOUSE BUTTON (LMB). LINES are selected using
the LMB to select the endpoints of the line.
The opposite corners of a BOX are selected using
the LMB. The center point and a point on the
circumference of the circle are selected using the LMB.
A LINE, BOX, or CIRCLE may be cancelled after the
first point is selected by using the RMB or by
moving the mouse cursor into the Menu line and
pressing either mouse button.
The active graphic object is selected by picking
'OBJECT' from the TOP MENU and then picking the
appropriate object from the OBJECT Sub-Menu.
The active object type is displayed in the status
line. Objects may be drawn while at any menu level.
Objects are stored in a memory array until they are
saved to disk.
DRAW-2D: A 2-D GRAPHICS EDITOR Page 7
6.0 GRAPHIC OPERATIONS
Graphic operations are the transformations which
can be applied to a graphic object. Graphic
operations fall into three general classes:
1. Operations that affect how the world
is viewed.
2. Operations that affect or transform
objects within the world.
3. Utility operations that involve the
printing, saving, and loading of
graphic objects. These functions
will be covered in Section 7.0.
All operations may be selected from the TOP MENU
or by picking options from the OPER-1 or OPER-2
Sub-menus. Menu selections can be made by using
either Mouse button.
You may also select which graphic objects are affected
by transformation operations. Graphic objects may
be selected in one of three ways:
1. OBJECT MODE -- only one selected object
will be affected
2. AREA MODE -- all objects within a
selected area are affected
3. DRAWING MODE -- all objects in the current
drawing are affected
The currently active operation MODE is displayed in the
status line.
DRAW-2D: A 2-D GRAPHICS EDITOR Page 8
6.0 GRAPHIC OPERATIONS (continued)
6.1 OPERATIONS THAT AFFECT THE WORLD
6.1.1 ZOOM-IN
This operation allows a closer view of a specific
part of the world. The corners of the viewing
area are indicated by using the LMB. The screen
scale factor is changed by this command and displayed
on the status line.
6.1.2 ZOOM-OUT
This operation restores the original view of
the world before any ZOOM-IN operations were
used. The screen scale factor is also changed.
6.1.3 PAN
This operation allows a view of different parts of
the world. This feature makes it possible to create
a drawing which is larger than the screen area.
6.2 OPERATIONS THAT TRANSFORM OBJECTS
6.2.1 SCALE
This operation provides the option of expanding
or shrinking the size of an object about any
selected reference point. A scale factor must
be entered from the keyboard. The scale factor
will affect the x and y values equally.
6.2.2 ROTATE
This operation provides the option of rotating
an object about any selected reference point.
A rotation angle in degrees must be entered
from the keyboard. A positive angle will cause
a counterclockwise rotation and a negative angle
will cause a clockwise rotation.
6.2.3 X-LATE
This operation will move any object from a location
to any other location. The object is moved within
the current world.
6.2.4 ERASE
This operation will delete any object or group
of objects from the drawing.
DRAW-2D: A 2-D GRAPHICS EDITOR Page 9
7.0 UTILITY OPERATIONS
7.1 MERGE
The merge operation allows multiple drawings to be
combined. The operation will not be accomplished if
either the merge file is not available or there is
not enough memory space for the additional objects.
7.2 RE-DRAW
Many of the operations include a screen re-draw.
However, a separate re-draw operation may be
desirable to remove construction marks.
7.3 LOAD
Drawing files may be loaded from disk to memory by
using this option. You will first be asked
whether or not to save the current drawing.
You may create an entirely new drawing by entering
a name which is not on the current list.
7.4 SAVE
You will have the option of saving the current
drawing to the current default filename or any
other valid filename of your choice. You may
save the entire drawing or only a portion of the
drawing depending on the current MODE.
7.5 PRINT
The print option will allow you to obtain a
hardcopy of your 2-D drawing on any Epson or
compatible printer. Only B/W output is supported.
DRAW-2D: A 2-D GRAPHICS EDITOR Page 10
8.0 CONFIGURATION OPTIONS
8.1 BELL ON/OFF
The terminal bell for input prompts may be toggled
on and off. The terminal bell will sound for error
conditions even if the BELL is in the OFF mode. The
bell status for input prompts is displayed on the
status line.
8.2 COLOR
Up to 16 foreground colors may be selected by using
color codes 0-15. However, only one foreground color
may be active at any one time. The default is a
white foreground on a black background.
8.3 CIRCLE SEGMENTS
Circles are drawn with line segments. The circle will
be rounder looking if more line segments are used.
However, the drawing time will increase as the number
of line segments increases. The number of line
segments for circles (LCIR) is displayed on the
status line.
8.4 CONTINUOUS LINES
Normally two endpoints must be specified for each
line drawn. However, in continuous line mode,
the last endpoint of the previous line is used
as the beginning endpoint for the next line. The
continuous line mode (CLIN) may be toggled on and off
and the current status is displayed on the status
line. The continuous line mode only affects
normal lines, and not vertical or horizontal lines.
8.5 SIZE OF THE WORLD
The area of the world viewed on the screen may be
changed. This option will also affect the screen
scale factor.
DRAW-2D: A 2-D GRAPHICS EDITOR Page 11
9.0 MAKING CHANGES AND RE-COMPILING DRAW-2D
9.1 NUMBER OF OBJECTS STORED IN MEMORY
The software is currently limited to the number of
graphic objects which may be used in a single drawing.
The limit is set at 500, however, this value may be
changed by altering the value of the Constant 'MAXSIZE'
in the Pascal source file 'DRAW2D.PAS' and then
re-compiling DRAW2D.
9.2 RE-COMPILING DRAW-2D
The program DRAW2D is compiled using TURBO PASCAL V3.0.
The built-in TURBO PASCAL graphics procedures PLOT and DRAW
are used as the basis for all the graphics operations
used in DRAW2D. No other software packages or graphics
support libraries are used by DRAW2D. DRAW2D may be
re-compiled using either the TURBO or TURBO-87 compilers.
The compiler options include:
C -- for .COM file
A -- max. free dynamic memory = 400
DRAW-2D: A 2-D GRAPHICS EDITOR Page 12
10.0 PROGRAM LIMITATIONS & FUTURE ENHANCEMENTS
10.1 NUMBER OF OBJECTS STORED IN MEMORY
The software currently uses a static memory array
to store objects. This limits the complexity of
your drawings. A future enhancement would be to
use pointer variables to dynamically allocate
objects. This would allow more complex drawings
by using all of available free memory.
10.2 CHARACTER FONTS
The program does not currently support character
fonts in the graphics drawing. Therefore, no
descriptive text information may be added to
the 2-D drawing. Adding Text objects would be
a desirable future enhancement.
10.3 COMPLEX OBJECTS
The ability to manipulate an entire set of
objects as one complex object would be desirable.
This would allow component drawing parts to be
constructed and used as single objects in more
complex drawings. Currently a group of objects
can be manipulated if they all reside within a
common area.
10.4 RUBBING BANDING & GRIDS
Rubber-banding and overlay grids are not practical
since the basic line drawing routines do not
support any type of XORing with current objects
on the screen. This software uses the basic
graphic procedures PLOT and DRAW of TURBO PASCAL V3.0.
10.5 ADDITIONAL OBJECTS
o Text
o Complex objects and symbol libraries
o Polygons
o Arcs
o Ellipses
10.6 ADDITIONAL OPERATIONS
o Copy an object, an area, or the entire drawing.
o Mirror images.
o Different scaling for x & y.
o Object and polygon fill.
10.7 ADDITIONAL FEATURES
o Faster drawing.
o Different line styles.
o Dimensioning.
o Calculate the length and areas of objects.
o Define fill patterns.
o Pointer variables for storing objects.
** Please call Dave Powers at 906-249-3205 regarding any changes
you have added or would like to see added to DRAW-2D.
·xINSLINE x